<?php
/**
 * Created by PhpStorm.
 * User: lijie
 * Date: 2018/10/31
 * Time: 16:10
 */
namespace app\reserve\model;

use think\Model;
use think\Db;

class Uptorecord extends Model{

    protected $table = "orange_uptorecord";
    protected $autoWriteTimestamp = true;
    protected $createTime = "ctime";
    protected $updateTime = "utime";
    protected $dateFormat;

    public function selectUptorecord($pagenum,$listNum,$w){
        $result["list"] = $this
            ->where($w)
            ->page($pagenum,$listNum)
            ->order("ctime desc")
            ->select();
        $result["total"] = $this
            ->where($w)
            ->count("id");
        return $result;
    }
}